﻿@model xiushen.Domain.Category
@{
    ViewBag.Title = "title";
}
<h2>
       <a href="@Url.Action("Index")">主目录</a></h2>

      <div class="row alert margin-top">
        <div class="span2"><strong>@Model.Name</strong></div>
 <div class="row">
@foreach (var data in Model.Book)
{
    var hasContent = !string.IsNullOrEmpty(data.DirectContent);
    var actionName = "Chapters";
    if (hasContent)
    {
        actionName = "BookContent";
    }
   
        <div class="span3">
            <a href="@Url.Action(actionName, new { bookId = data.ID, categoryId = Model.ID })">@data.Name</a></div>
   
}
 </div>